/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Literal;

/**
 *
 * @author Ibon
 */
public class Principal {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Octal oct = new Octal();
        HexTest hex = new HexTest();
        double d = 11301874.9881024;
        boolean t = true; // Legal
        boolean f = 0; // Compiler error!
        String s = "Bill Joy";
        System.out.println("Bill" + " Joy");


        //Casting
        byte a = 3; // No problem, 3 fits in a byte
        byte b = 8; // No problem, 8 fits in a byte
        byte c = b + c; // Should be no problem, sum of the two bytes
// fits in a byte but need more than two bytes then error

        // Implicit cast
        int a = 100;
        long b = a; // Implicit cast, an int value always fits in a long
        // Explicit cast
        float a = 100.001f;
        int b = (int) a; // Explicit cast, the float could lose info
// illegal
        int x = 3957.229; // illegal
// legal
        int x = (int) 3957.229; // legal cast
    }
}
